package gttp.nspa.client.adm.rpc;

import gttp.nspa.shared.om.Customer;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("customer")
public interface ICustomerService extends RemoteService {

    Customer load(long id);

    void save(Customer c);

    void delete(long id);

    void delete(Long[] ids);

    List<Customer> listBy(int offset, int limit, String[] orders);

    List<Customer> listBy(String name,
                          String address,
                          String phone,
                          String email,
                          int offset,
                          int limit,
                          String[] orders);

    Customer create(String name, String phone, String address, String email);
}
